package cn.trigram.config;

import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.BlockRequestHandler;
import org.springframework.web.reactive.function.server.ServerResponse;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * sentinel 整合 gateway 后，发生异常的自定义处理器 使用UrlBlockHandler可以优化错误提示，这样我们能区分出这个接口是因为 限流或降级还是异常的原因导致的；
 */
public class GatewaySentinelBlockRequestHandler
    implements BlockRequestHandler {

  @Override
  public Mono<ServerResponse> handleRequest(
      ServerWebExchange exchange, Throwable t
  ) {

    return null;
  }

}
